<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta  charset="utf-8">
<meta  name="viewport"  content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>商品出价</title>
<link  rel="stylesheet"  href="../addons/feng_auction/template/css/css.css">
<script   src="../addons/feng_auction/template/js/jquery190.js" type="text/javascript"></script>
<script  src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript"></script>
</head>
<body  style="background:#f6f6f8;">
<section  class="wrap">
	<form id="form1" action="javascript:;" method="post">
	<section  class="white_box">
		<dl  class="order">
			<dt  class="pri_img1"> 
				<a  id="oneGiftLink"  title="{$goods['title']}"><img  id="oneGiftImg"  src="{$_W['attachurl']}{$goods['picarr']}"  alt="{$goods['title']}"></a>
			</dt>
			<dd  class="pri_info1">
				<h3  class="pri_tit"> 
					<a  id="oneGiftName"  title="{$goods['title']}">{$goods['title']}</a>
				</h3>
				<p>当前价：<span  id="oneGiftNeed" class="fc">￥{$goods['st_price']}</span>，最低加价：<span  id="oneGiftLeft"  class="fc" value="{$goods['add_price']}">￥{$goods['add_price']}</span></p>
				<div  id="oneChangeOpt"  class="rec_box"  style=""> 出价
					<div  class="item_amount ">
						<input  id="oneChangeNum"  type="text"  class="ip_num"  value="{if !empty($record)}<?php echo $goods['st_price']+$goods['add_price'] ?>{else}{$goods['st_price']}{/if}">
						<textarea id="experience" name="experience" style="display: none;"><?php echo $goods['st_price']+$goods['add_price'] ?></textarea>
					</div> 
					<span  class="rec_txt">元</span>
				</div>
			</dd>
		</dl>
	</section>
	</form>
	<section  id="oneDoWrap"  class="abs_bottom"  style="">
		<div  class="submit">
			<p>第一次出价需交保证金<span  id="oneDoChangeNum"  class="fc">{$goods['bond']}</span>元</p>
			<a  id="oneDoChange"  href="javascript:submit();"  title="提交"  class="smt_btn">提交出价</a>
		</div>
	</section>
</section>
{if empty($record)}
<script type="text/javascript">
	function submit(){	    
    	var form_input = document.getElementById("form1");
    	var shengyurenshu=form_input['experience'].value;
    	var ip_num=form_input['oneChangeNum'].value;

    	if (ip_num<Number({$goods['st_price']})) {
    		alert('当前加价小于最低加价！');
    		return false;
    	}

		var url="./index.php?i="+{php echo $weid}+"&c=entry&id="+{php echo $goods['id']}+"&count="+ip_num+"&bond="+{php echo $goods['bond']}+"&do=postorder&m=feng_auction&wxref=mp.weixin.qq.com#wechat_redirect";
		window.location.href=url;
	}
</script>
{else}
<script type="text/javascript">
	function submit(){	    
    	var form_input = document.getElementById("form1");
    	var shengyurenshu=form_input['experience'].value;
    	var ip_num=form_input['oneChangeNum'].value;

		if (ip_num<Number(shengyurenshu)) {
			alert('当前加价小于最低加价！');
			return false;
		}
		var url="./index.php?i="+{php echo $weid}+"&c=entry&id="+{php echo $goods['id']}+"&count="+ip_num+"&bond="+{php echo $goods['bond']}+"&do=postorder&m=feng_auction&wxref=mp.weixin.qq.com#wechat_redirect";
		window.location.href=url;
	}
</script>
{/if}
</body>
</html>